/**
 * @param {string} s
 * @return {number}
 */
var lengthOfLongestSubstring = function (s) {
  let res = 0
  let left=0,right=0
  while(right<s.length){
    let str = s.slice(left,right)
    right++
    if(str.indexOf(right)!=-1){
      
    }
  }
  return res
}
console.log(lengthOfLongestSubstring("pwwkew"))
